Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake-generated libzmq.pc file #4706

Merged
merged 1 commit into from
Aug 21, 2024
Merged

Conversation

hebasto
Copy link
Contributor

@hebasto hebasto commented Jul 17, 2024

This PR mirrors the Autotools-based build system behavior for cross-compiling for Windows with static linking:

PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -liphlpapi -lws2_32"

and properly populates the Libs.private section in the CMake-generated libzmq.pc file.

Addresses the unresolved issue in #4667:

Please note that CMake-generated libzmq.pc file is also broken as its "Libs.private" section contains only -lstdc++ when cross-compiling for Windows. I leave this problem out of this PR scope.

CMakeLists.txt Outdated Show resolved Hide resolved
This change mirrors the Autotools-based build system behavior for
cross-compiling for Windows with static linking.
@hebasto
Copy link
Contributor Author

hebasto commented Aug 21, 2024

Rebased to refresh CI.

@bluca bluca merged commit 5f408ba into zeromq:master Aug 21, 2024
37 of 58 checks passed
@hebasto hebasto deleted the 240717-cmake-pc branch August 21, 2024 12:43
hebasto added a commit to hebasto/bitcoin that referenced this pull request Aug 28, 2024
fanquake added a commit to bitcoin/bitcoin that referenced this pull request Aug 28, 2024
371910a depends: Fix CMake-generated `libzmq.pc` file (Hennadii Stepanov)

Pull request description:

  This is a backport of: zeromq/libzmq#4706.

  Similar to #30488.

  Addresses #29723 (comment):
  > Looking at the mingw .pc generated by this PR:
  >
  > ```
  > Libs: -L${libdir} -lzmq
  > Libs.private:
  > Requires.private:
  > ```
  >
  > It looks like we'll need to take [zeromq/libzmq#4706](zeromq/libzmq#4706) as well for CMake. That can be done as a follow-up though, as it's not yet merged upstream.

ACKs for top commit:
  fanquake:
    ACK 371910a

Tree-SHA512: 6f9c2e32f83c0e629e32fd3e4c86712af00ffeaf0906bf85e5c2df889302707b9df102e8031249d1bae036eb4fc019c2a5124655682fbc5652d9337cb21c5f2c
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 27, 2024
371910a depends: Fix CMake-generated `libzmq.pc` file (Hennadii Stepanov)

Pull request description:

  This is a backport of: zeromq/libzmq#4706.

  Similar to bitcoin#30488.

  Addresses bitcoin#29723 (comment):
  > Looking at the mingw .pc generated by this PR:
  >
  > ```
  > Libs: -L${libdir} -lzmq
  > Libs.private:
  > Requires.private:
  > ```
  >
  > It looks like we'll need to take [zeromq/libzmq#4706](zeromq/libzmq#4706) as well for CMake. That can be done as a follow-up though, as it's not yet merged upstream.

ACKs for top commit:
  fanquake:
    ACK 371910a

Tree-SHA512: 6f9c2e32f83c0e629e32fd3e4c86712af00ffeaf0906bf85e5c2df889302707b9df102e8031249d1bae036eb4fc019c2a5124655682fbc5652d9337cb21c5f2c
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 27, 2024
371910a depends: Fix CMake-generated `libzmq.pc` file (Hennadii Stepanov)

Pull request description:

  This is a backport of: zeromq/libzmq#4706.

  Similar to bitcoin#30488.

  Addresses bitcoin#29723 (comment):
  > Looking at the mingw .pc generated by this PR:
  >
  > ```
  > Libs: -L${libdir} -lzmq
  > Libs.private:
  > Requires.private:
  > ```
  >
  > It looks like we'll need to take [zeromq/libzmq#4706](zeromq/libzmq#4706) as well for CMake. That can be done as a follow-up though, as it's not yet merged upstream.

ACKs for top commit:
  fanquake:
    ACK 371910a

Tree-SHA512: 6f9c2e32f83c0e629e32fd3e4c86712af00ffeaf0906bf85e5c2df889302707b9df102e8031249d1bae036eb4fc019c2a5124655682fbc5652d9337cb21c5f2c
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 27, 2024
371910a depends: Fix CMake-generated `libzmq.pc` file (Hennadii Stepanov)

Pull request description:

  This is a backport of: zeromq/libzmq#4706.

  Similar to bitcoin#30488.

  Addresses bitcoin#29723 (comment):
  > Looking at the mingw .pc generated by this PR:
  >
  > ```
  > Libs: -L${libdir} -lzmq
  > Libs.private:
  > Requires.private:
  > ```
  >
  > It looks like we'll need to take [zeromq/libzmq#4706](zeromq/libzmq#4706) as well for CMake. That can be done as a follow-up though, as it's not yet merged upstream.

ACKs for top commit:
  fanquake:
    ACK 371910a

Tree-SHA512: 6f9c2e32f83c0e629e32fd3e4c86712af00ffeaf0906bf85e5c2df889302707b9df102e8031249d1bae036eb4fc019c2a5124655682fbc5652d9337cb21c5f2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants